#ifndef SIMPLEDATADISWINDOW_H
#define SIMPLEDATADISWINDOW_H

#include <QMainWindow>
#include <QTabWidget>
#include <QDockWidget>
#include <QMenuBar>
#include <QMenu>
#include <QToolBar>
#include <QActionGroup>
#include <QAction>
#include <QKeyEvent>
#include "graphicsview/barwidget.h"
#include "graphicsview/timecontrolwidget.h"
#include "graphicsview/orderswidget.h"

class SimpleDataDisWindow : public QMainWindow
{
    Q_OBJECT

public:
    SimpleDataDisWindow(QWidget *parent = 0, Qt::WFlags flags = 0);
    ~SimpleDataDisWindow();

    void setWindowTitle(const QString& title);

public slots:
    void slotTabChanged(int tab);
    void slotSetPeriod();
    void slotOpenCurrency();

protected:
    void mailToUser();
    void createMenus();
    void createToolBar();
    void createWidgets();
    void createAction();
    void createConnectionsWidget();
    void createConnectionsThis();
    void removeConnectionsWidget();

    virtual void keyPressEvent(QKeyEvent *event);

private:
    QString m_windowTitle;

    // Menus
    QMenuBar *m_menu;
    QMenu *m_fileMenu;
    //
    QToolBar *m_toolBar;

    //
    QAction *m_openFileAction;
    QAction *m_orderListAction;
    QAction *m_timeSliderAction;
    QAction *m_zoomInAction;
    QAction *m_zoomOutAction;
    QAction *m_drawLineAction;
    QActionGroup *m_timeActionGroup;
    QAction *m_M1Action;
    QAction *m_M5Action;
    QAction *m_M15Action;
    QAction *m_M30Action;
    QAction *m_H1Action;
    QAction *m_H4Action;
    QAction *m_D1Action;
    QAction *m_W1Action;
    QAction *m_WNAction;

    QTabWidget *m_barTabWidget;
    QDockWidget *m_dockTimeWidget;
    BarWidget *m_barWidget;
    BarWidget *m_prevWidget;
    TimeControlWidget *m_timeWidget;
    OrdersWidget *m_ordersWidget;

    static const std::string s_loggerCat;
};

#endif // SIMPLEDATADISWINDOW_H